package com.ruoyi.project.infoprojectdepartment.mapper;

import com.ruoyi.project.infoprojectdepartment.domain.InfoProjectDepartment;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 协同科室项目关联Mapper接口
 *
 * @author ruoyi
 * @date 2022-06-29
 */
public interface InfoProjectDepartmentMapper
{
    /**
     * 查询协同科室项目关联
     *
     * @param id 协同科室项目关联主键
     * @return 协同科室项目关联
     */
    public InfoProjectDepartment selectInfoProjectDepartmentById(Long id);

    /**
     * 查询协同科室项目关联列表
     *
     * @param infoProjectDepartment 协同科室项目关联
     * @return 协同科室项目关联集合
     */
    public List<InfoProjectDepartment> selectInfoProjectDepartmentList(InfoProjectDepartment infoProjectDepartment);

    /**
     * 新增协同科室项目关联
     *
     * @param infoProjectDepartment 协同科室项目关联
     * @return 结果
     */
    public int insertInfoProjectDepartment(InfoProjectDepartment infoProjectDepartment);

    /**
     * 修改协同科室项目关联
     *
     * @param infoProjectDepartment 协同科室项目关联
     * @return 结果
     */
    public int updateInfoProjectDepartment(InfoProjectDepartment infoProjectDepartment);

    /**
     * 删除协同科室项目关联
     *
     * @param id 协同科室项目关联主键
     * @return 结果
     */
    public int deleteInfoProjectDepartmentById(Long id);

    /**
     * 批量删除协同科室项目关联
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteInfoProjectDepartmentByIds(Long[] ids);

    /**
     *
     * @param projectIds
     * @param departmentId
     * @return
     */
    int insertBatchProjectDepartment(@Param(value = "projectIds") List<Long> projectIds,@Param(value = "departmentId") String departmentId
    ,@Param(value = "createUser") Long createUser,@Param(value = "createTime") Date createTime);

    /**
     * 获取科室协同项目
     * @param deptId
     * @return
     */
    List<Map<String,Object>> selectDepartmentProjectList(@Param(value = "deptId") Long deptId,@Param(value = "projectName") String projectName);
}
